home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
151-175
/
disk_166
/
stevie
/
bugs
/
bug2
/
fileio.c.diff
next >
Wrap
Text File
|
1992-05-06
|
660b
|
39 lines
*** fileio.c Fri Jun 10 16:15:19 1988
--- fileio.c.new Sun Oct 2 23:23:23 1988
***************
*** 6,11 ****
--- 6,13 ----
*/
#include "stevie.h"
+ #include <sys/types.h>
+ #include <sys/stat.h>
void
filemess(s)
***************
*** 45,50 ****
--- 47,53 ----
int unprint = 0;
int linecnt = 0;
bool_t wasempty = bufempty();
+ struct stat stat_buf;
curr = fromp->linep;
***************
*** 54,59 ****
--- 57,66 ----
if ( (f=fopen(fname,"r")) == NULL )
return TRUE;
+ stat(fname,&stat_buf);
+ if ( stat_buf.st_size == 0 )
+ return FALSE;
+
filemess("");
for (i=nchars=0; (c=getc(f)) != EOF ;nchars++) {